package com.heima.stroke.handler.valuation;

public class FuelCostValuation implements Valuation {

    private Valuation valuation;

    public FuelCostValuation(Valuation valuation) {

        this.valuation = valuation;
    }

    float price=1F;

    @Override
    public float calculation(float km) {
        float fuelPrice=(valuation==null? 0f:valuation.calculation(km));

        return fuelPrice+price;
    }
}
